package com.yonyou.pmclouds.processinspect.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yonyou.pmclouds.basecom.entity.SuperVO;
import com.yonyou.pmclouds.constructionlog.entity.ConstructionLogRefVO;
import com.yonyou.pmclouds.constructionlog.entity.ConstructionLogVO;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;

@Table(name="pmbd_procedureinspect")
@Getter
@Setter
public class ProcedureInspectVO extends SuperVO{
	
	private static final long serialVersionUID = -2110806895361656214L;

    public static String PK_PROJECT = "pk_project";
    public static String PK_PROCEDURE = "pk_procedure";

	public static String CREATOR = "creator";
	public static String CREATORNAME = "creatorname";
	public static String ACCEPTOR = "acceptor";
	public static String ACCEPTORNAME = "acceptorname";
	public static String APPROVE_OPINION = "approve_opinion";
	public static String BILLSTATUS = "billstatus";

    public static String PK_CONSTRUCTION_UNIT = "pk_constructionunit";
    public static String CONSTRUCTION_UNIT_NAME = "constructionunit_name";

    @Id
	private String pk_process_inspect;
	private String pk_project;
	private String pk_procedure;
	private String memo;
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    private Date inspect_date;
	// 验收人
	private String acceptor;
	// 经度
    private BigDecimal longitude;
    // 纬度
    private BigDecimal latitude;
    // 位置信息
    private String position;
    private String bill_type;
    private String approve_opinion;
    private byte billstatus;
    
    @Column(name="creator",updatable=false)
    private String creator;
    @Column(name="creationtime",updatable=false)
    private Date creationtime;
    private String modifier;
    private Date modifytime;
    
    @Transient
    private String[] pk_records;
    @Transient
    private ProcedureInspectBodyVO[] bodyVOs;
    @Transient
    private String project_name;
    @Transient
    private String project_code;
    @Transient
    private String procedure_name;
    @Transient
    private String creatorname;
    @Transient
    private String acceptorname;
    @Transient
    private ConstructionLogVO[] constructionLogVOs;
    // 打印预览需要字符串日期
    @Transient
    private String strCreationtime;
    @Transient
    private String strBillstatus;
    @Transient
    private String orgName;
    // 临时存储
    @Transient
    private ConstructionLogRefVO[] constructionLogRefVOS;
    // 检查部位(所有关联的施工记录检查部位拼接)
    @Transient
    private String inspectarea;
    // 监理单位
    @Transient
    private String pk_supervisionunit;
    @Transient
    private String supervisionunit_name;
    //施工单位
    @Transient
    private String pk_constructionunit;
    @Transient
    private String constructionunit_name;
    @Transient
    private int bodyNum;

    private String pk_tenant;
    public String taskReceiverField(){
    	return ACCEPTOR;
    }
    
}
